** construction regressions using place-level annual data

set trace off
set more 1 
capture log close
clear
clear matrix
clear mata
set matsize 11000
set maxvar 32767
set linesize 200
version 9

log using table2.log, replace

use placeann.dta if sfus~=., clear
drop if dlrgasp1at==. | husf80==.
drop if cbsa==.
drop if micro==1
egen nobs = count(sfus), by(newid)

tab year, gen(y)
tab year if nobs==28
egen msayear = group(cbsa year)
reg sfus dlrgasp1t24up dlrgasp2t24up dlrgasp3t24up dlrgasp4t24up dlrgasp1d dlrgasp2d dlrgasp3d dlrgasp4d dlfrm1t24up dlfrm2t24up dlfrm3t24up dlfrm4t24up  dlgdp1t24up dlgdp2t24up dlgdp3t24up dlgdp4t24up [w=husf80]
keep if e(sample)
keep sfus dlrgasp1t24up dlrgasp2t24up dlrgasp3t24up dlrgasp4t24up dlrgasp1d dlrgasp2d dlrgasp3d dlrgasp4d dlfrm1t24up dlfrm2t24up dlfrm3t24up dlfrm4t24up  dlgdp1t24up dlgdp2t24up dlgdp3t24up dlgdp4t24up husf80 cbsa newid msayear year

xi: areg sfus dlrgasp1t24up dlrgasp2t24up dlrgasp3t24up dlrgasp4t24up dlrgasp1d dlrgasp2d dlrgasp3d dlrgasp4d dlfrm1t24up dlfrm2t24up dlfrm3t24up dlfrm4t24up  dlgdp1t24up dlgdp2t24up dlgdp3t24up dlgdp4t24up  i.newid  [w=husf80], cluster(cbsa) absorb(msayear)
lincom dlrgasp1t24up+dlrgasp2t24up+dlrgasp3t24up+dlrgasp4t24up
lincom dlrgasp1d+dlrgasp2d+dlrgasp3d+dlrgasp4d
lincom dlfrm1t24up+dlfrm2t24up+dlfrm3t24up+dlfrm4t24up
lincom dlgdp1t24up+dlgdp2t24up+dlgdp3t24up+dlgdp4t24up



quietly log off
quietly log close
set more 0
